package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_sly_scsy database table.
 * 
 */
@Entity
@Table(name="per_sly_scsy")
@NamedQuery(name="PerSlyScsy.findAll", query="SELECT p FROM PerSlyScsy p")
public class PerSlyScsy implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="PER_SLY_SCSY_SCSYID_GENERATOR", sequenceName="SEQ1",allocationSize=1,initialValue=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PER_SLY_SCSY_SCSYID_GENERATOR")
	private int scsyid;

	private String scsyname;

	private String scsytype;

	//bi-directional many-to-one association to PerSlyTax
	@ManyToOne
	@JoinColumn(name="TAXID")
	private PerSlyTax perSlyTax;

	//bi-directional many-to-one association to PerSlySzx
	@OneToMany(mappedBy="perSlyScsy")
	private List<PerSlySzx> perSlySzxs;

	public PerSlyScsy() {
	}

	public int getScsyid() {
		return this.scsyid;
	}

	public void setScsyid(int scsyid) {
		this.scsyid = scsyid;
	}

	public String getScsyname() {
		return this.scsyname;
	}

	public void setScsyname(String scsyname) {
		this.scsyname = scsyname;
	}

	public String getScsytype() {
		return this.scsytype;
	}

	public void setScsytype(String scsytype) {
		this.scsytype = scsytype;
	}

	public PerSlyTax getPerSlyTax() {
		return this.perSlyTax;
	}

	public void setPerSlyTax(PerSlyTax perSlyTax) {
		this.perSlyTax = perSlyTax;
	}

	public List<PerSlySzx> getPerSlySzxs() {
		return this.perSlySzxs;
	}

	public void setPerSlySzxs(List<PerSlySzx> perSlySzxs) {
		this.perSlySzxs = perSlySzxs;
	}

	public PerSlySzx addPerSlySzx(PerSlySzx perSlySzx) {
		getPerSlySzxs().add(perSlySzx);
		perSlySzx.setPerSlyScsy(this);

		return perSlySzx;
	}

	public PerSlySzx removePerSlySzx(PerSlySzx perSlySzx) {
		getPerSlySzxs().remove(perSlySzx);
		perSlySzx.setPerSlyScsy(null);

		return perSlySzx;
	}

}